home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Environments / Prograph Classic 2.6.1 / Examples / Splitter ƒ / Splitter Read Me next >
Encoding:
Text File  |  1995-09-29  |  2.5 KB  |  58 lines  |  [TEXT/ttxt]

  1. Example:                       Split Window
  2. Written by:                   John Garden, Pictorius Incorporated
  3. Updated for 2.6.1 by:            The Tech Support Team, Pictorius Incorporated
  4.  
  5. Contents:     Splitter.pgs
  6.                    Splitter Read Me
  7.  
  8. Needs Prograph Extensions:
  9.                    The default configuration of your 'Prograph Extensions' folder.
  10.  
  11. Needs Libraries to Compile:
  12.                    SCLibrary 2.6
  13.                    Library 2.6
  14.  
  15. Description
  16. -----------
  17. This example demonstrates a window with two "panes; the divider between them ( a "Splitter") can be dragged to resize the panes.  The file Splitter.pgs contains the Splitter class, and a demo window which
  18. demonstrates how to use it.
  19.  
  20. Select Run from the Exec menu and the split window will appear.
  21. You may click in and drag the space between the two canvases to change
  22. the division within the window. Clicking within a canvas produces a
  23. message indicating which canvas was clicked in. The canvases share a
  24. single, very simple Draw method. It graphically demonstrates how a split
  25. window might be used to provide two simultaneous, independent views of
  26. the same data ( a text file, for example ). Of course, they could just as
  27. easily have completely different Draw methods. In fact, the objects in the
  28. window need not even be canvases. You might wish to have a Scroll List
  29. and a Scroll Text, for example.
  30.  
  31. How to Use The Table  Class in Your Program
  32. -----------------------------------------
  33.  
  34. Simply position your display items in the window in their default positions
  35. a few pixels apart. Then add an instance of Splitter to the window. It
  36. be just large enough to cover the space between the items, and should be
  37. behind them ( you can use Send Further to ensure this ). The Click method
  38. of the Splitter will then handle all the dragging and resizing.
  39.  
  40. Notes: 
  41.     The Splitter Click method looks for two items called Upper and Lower. If
  42. you wish to use different names, simply change the Click method.
  43.  
  44.     You can use more than one Splitter in a window. This will require a
  45. separate Click method for each Splitter, so that each will drag and resize
  46. the appropriate window items
  47.  
  48.     The Splitter assumes the the canvases have vertical scroll bars, and
  49. in several places adjusts for them by subtracting the constant 15 from
  50. various points and rects. This code may have to be adjusted to suit your
  51. particular situation.
  52.  
  53. If your window has a Grow and/or a Zoom box, or if you set the size
  54. programatically, you should set the Move with Window and Grow with
  55. Window attributes of your Splitter and the window items associated
  56. with it.
  57.  
  58.